<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 等腰三角形
        var sum=0;
        for(var i=0;i<=6;i++){
            for(var m=6;m>i;m--){
                document.write("&nbsp;&nbsp&nbsp;");
            }
            for(var j=0;j<=i;j++){
                document.write(j+"&nbsp;");
            }
            for(var k=i-1;k>=0;k--){
                document.write(k+"&nbsp;");
            }
            document.write("<br>");
        }

    </script>
</body>
</html>